<?php
defined('_JEXEC') or die('Restricted access');
$link_more = JRoute::_("index.php?option=com_sim&category=".$id."&title=".urlencode($categoryname));
?>
<div class="div_sim">
    <table border="0" cellpadding="5" width="100%" cellspacing="1">
        <tr class="tr_header_sim">
            <th nowrap="nowrap" width="5%">
                <?php echo JText::_( 'ID' ); ?>
            </th>
            <th nowrap="nowrap" width="25%">
                <?php echo JText::_( 'Số sim' ); ?>
            </th>
            <th nowrap="nowrap" width="20%">
                <?php echo JText::_( 'Giá' ); ?>
            </th>
            <th nowrap="nowrap" width="20%">
                <?php echo JText::_( 'Mạng' ); ?>
            </th>
            <th nowrap="nowrap" width="20%">
                <?php echo JText::_( 'Loại sim' ); ?>
            </th>
            <th nowrap="nowrap" width="15%">
                <?php echo JText::_( 'Mua' ); ?>
            </th>
        </tr>
        <?php
        $stt=1;
        foreach($list as $review)
        {
            $link = JRoute::_( 'index.php?option=com_sim&task=order&sim_id='.$review->sim_id.'&simnumb='.trim($review->sim_numb));
            ?>
        <tr align="center" class="tr_sim">
            <td><?php echo $stt; ?></td>
            <td>
                <a href="<?php echo $link; ?>"><?php echo $review->sim_numb;?></a>
            </td>
            <td><?php echo JUtility::thousandseperate($review->price);?>.000 <?php echo $review->curency; ?></td>
            <td><?php echo $review->provider_name; ?></td>
            <td><?php echo $review->categori_name; ?></td>
            <td>
                <a href="<?php echo $link; ?>"><img src="images/publish_f2.png" /></a>
            </td>
        </tr>
        <?php
        $stt++;
    }
    ?>
    </table>
</div>
<div align="right">
    <b style="color:red;">Tổng sim <?php echo '"'.$categoryname.'" : '.$totalsim.' sim';?></b><br/>
    <a style="color:red;" href="<?php echo $link_more;?>">>>Xem thêm</a>
</div>

